From f906e82a93416300e1e6ddf401d9a9f294aea73b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 26 Aug 2005 19:05:31 +0000 Subject: [PATCH] Add a separate --ignore-theme-index option to avoid overloading --force. 2005-08-26 Matthias Clasen * gtk/updateiconcache.c: Add a separate --ignore-theme-index option to avoid overloading --force. (JP Rosevaar) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ docs/reference/ChangeLog | 5 +++++ docs/reference/gtk/gtk-update-icon-cache.1 | 9 +++++++-- docs/reference/gtk/gtk-update-icon-cache.xml | 11 +++++++++++ gtk/updateiconcache.c | 6 ++++-- 6 files changed, 37 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c486e84a94..c872f2649d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-26 Matthias Clasen + + * gtk/updateiconcache.c: Add a separate --ignore-theme-index option + to avoid overloading --force. (JP Rosevaar) + 2005-08-26 Matthias Clasen * configure.in: Bump version to 2.9.0 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c486e84a94..c872f2649d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-08-26 Matthias Clasen + + * gtk/updateiconcache.c: Add a separate --ignore-theme-index option + to avoid overloading --force. (JP Rosevaar) + 2005-08-26 Matthias Clasen * configure.in: Bump version to 2.9.0 diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 35e472b316..1c3dafad2c 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2005-08-26 Matthias Clasen + + * gtk/gtk-update-icon-cache.xml: + * gtk/gtk-update-icon-cache.1: Updates. + 2005-08-26 Matthias Clasen * gdk-pixbuf/gdk-pixbuf.sgml: diff --git a/docs/reference/gtk/gtk-update-icon-cache.1 b/docs/reference/gtk/gtk-update-icon-cache.1 index 8f8707eab0..8f563d083b 100644 --- a/docs/reference/gtk/gtk-update-icon-cache.1 +++ b/docs/reference/gtk/gtk-update-icon-cache.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GTK\-UPDATE\-ICON\-CACH" "1" "08/23/2005" "" "" +.TH "GTK\-UPDATE\-ICON\-CACH" "1" "08/26/2005" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -11,7 +11,7 @@ gtk\-update\-icon\-cache \- Icon theme caching utility .SH "SYNOPSIS" .HP 22 -\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-index\-only] [\-\-quiet] {iconpath} +\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-index\-only] [\-\-ignore\-theme\-index] [\-\-quiet] {iconpath} .SH "DESCRIPTION" .PP \fBgtk\-update\-icon\-cache\fR @@ -31,6 +31,11 @@ to avoid a lot of system call and disk seek overhead when the application starts \-\-force, \-f Overwrite an existing cache file even if it appears to be uptodate. .TP +\-\-ignore\-theme\-index, \-t +Don't check for the existence of 'index.theme' in the icon theme directory. Without this option, +\fBgtk\-update\-icon\-cache\fR +refuses to create an icon cache in a directory which does not appear to be the toplevel directory of an icon theme. +.TP \-\-index\-only, \-i Don't include image data in the cache. .TP diff --git a/docs/reference/gtk/gtk-update-icon-cache.xml b/docs/reference/gtk/gtk-update-icon-cache.xml index 4c2afa4e01..726c0fb161 100644 --- a/docs/reference/gtk/gtk-update-icon-cache.xml +++ b/docs/reference/gtk/gtk-update-icon-cache.xml @@ -15,6 +15,7 @@ gtk-update-icon-cache --force --index-only +--ignore-theme-index --quiet iconpath @@ -47,6 +48,16 @@ multiple applications, the overall memory consumption is reduced as well. + + --ignore-theme-index + -t + Don't check for the existence of 'index.theme' in the icon theme + directory. Without this option, gtk-update-icon-cache refuses + to create an icon cache in a directory which does not appear to be the toplevel + directory of an icon theme. + + + --index-only -i diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c index 2da6d00330..468f31a759 100644 --- a/gtk/updateiconcache.c +++ b/gtk/updateiconcache.c @@ -39,6 +39,7 @@ #include static gboolean force_update = FALSE; +static gboolean ignore_theme_index = FALSE; static gboolean quiet = FALSE; static gboolean index_only = FALSE; @@ -1208,6 +1209,7 @@ build_cache (const gchar *path) static GOptionEntry args[] = { { "force", 'f', 0, G_OPTION_ARG_NONE, &force_update, "Overwrite an existing cache, even if uptodate", NULL }, + { "ignore-theme-index", 't', 0, G_OPTION_ARG_NONE, &ignore_theme_index, "Don't check for the existence of index.theme", NULL }, { "index-only", 'i', 0, G_OPTION_ARG_NONE, &index_only, "Don't include image data in the cache", NULL }, { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, "Turn off verbose output", NULL }, { NULL } @@ -1232,10 +1234,10 @@ main (int argc, char **argv) path = g_locale_to_utf8 (path, -1, NULL, NULL, NULL); #endif - if (!force_update && !has_theme_index (path)) + if (!ignore_theme_index && !has_theme_index (path)) { g_printerr ("No theme index file in '%s'.\n" - "If you really want to create an icon cache here, use --force.\n", path); + "If you really want to create an icon cache here, use --ignore-theme-index.\n", path); return 1; } -- 2.30.2